<template>
	<view style="width: 100vw;height: 100vh;">
		<view class=""
		@click="goindateil(item.chargingOrdersId)"
			v-for="(item,index) in dingdandata"
			style="width: 90%;height: auto;margin: auto;margin-top: 50rpx;border-radius: 36rpx;border: 1rpx solid #ccc;padding: 20rpx;">
			<text style="display: block;margin: auto;width: 100%;text-align: center;">订单明细</text>
			<view class="" style="margin-top: 20rpx;margin-bottom: 20rpx;">
				<span style="color:#ccc;font-size: 45rpx;">|</span>
				<text style="margin-left: 20rpx;font-size: 28rpx;">订单编号:{{item.chargingOrdersNo}}</text>
			</view>
			<view class="" style="margin-top: 20rpx;margin-bottom: 20rpx;">
				<span style="color:#ccc;font-size: 45rpx;">|</span>
				<text style="margin-left: 20rpx;">开始时间:{{item.beginTime}}</text>
			</view>
			<view class="" style="margin-top: 20rpx;margin-bottom: 20rpx;">
				<span style="color:#ccc;font-size: 45rpx;">|</span>
				<text style="margin-left: 20rpx;">充电站名称:{{item.chargingStationName}}</text>
			</view>
			<view class="" style="margin-top: 20rpx;margin-bottom: 20rpx;">
				<span style="color:#ccc;font-size: 45rpx;">|</span>
				<text style="margin-left: 20rpx;">充电桩编号:{{item.chargingPileNo}}</text>
			</view>
			<view class="" style="margin-top: 20rpx;margin-bottom: 20rpx;">
				<span style="color:#ccc;font-size: 45rpx;">|</span>
				<text style="margin-left: 20rpx;">充电量:{{item.chargedQuantity}}</text>
			</view>
			<view class="" style="margin-top: 20rpx;margin-bottom: 20rpx;">
				<span style="color:#ccc;font-size: 45rpx;">|</span>
				<text style="margin-left: 20rpx;">充电时长:{{item.chargingDuration}}</text>
			</view>
			<view class="" style="margin-top: 20rpx;margin-bottom: 20rpx;">
				<span style="color:#ccc;font-size: 45rpx;">|</span>
				<text style="margin-left: 20rpx;">待支付金额:{{item.pendingPaymentAmount}}</text>
			</view>
			<view class="" style="margin-top: 60rpx;margin-bottom: 40rpx;">
				<button @click.stop="butdaizhifu" style="width: 70%;border-radius: 72rpx;">支付</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dingdandata:null
			};
		},
		methods:{
			goindateil(id){
				uni.navigateTo({
					url:'../indateil/indateil?id='+id
				})
			}
		},
		onLoad() {
			this.$request({
				url:'/dev-api/bs-smart-charger/orders/allList',
				header:{
					Authorization:uni.getStorageSync('token')
				},
				data:{
					carId:uni.getStorageSync('carid'),
					chargingStationId: 1,
					chargingPileId: 1
				}
			}).then(res=>{
				this.dingdandata = res.data
			})
		}
	}
</script>

<style lang="scss">

</style>
